package lanQiaoBei.基础算法.双指针;
import java.io.*;
/*
* 给定一段字符序列 abc def ghi
* 请按行输出每个用空格隔开的单词
*
* 大致模板
* '''
* for(int i=0,j=0;i<n;i++){
*    while(j<=i&&check(i,j))j++;
*    //每道题的具体逻辑
* }
* '''
* */
public class P1 {
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    static String s;
    public static void scan()throws Exception{
           s=br.readLine();
    }
    public static void main(String[]args)throws Exception{
        scan();
        for(int i=0;i<s.length();i++){
            int j=i;
            while(j<s.length()&&s.charAt(j)!=' ')j++;
            for(;i<j;i++)
                System.out.print(s.charAt(i));
            System.out.println();
        }
    }
}
